<template>
  <div class="plugin-option__inner">
    <em-cell-group
      v-if="options"
      title="顶部标题设置"
    >
      <em-cell
        v-if="options.title!==undefined"
        title="标题内容"
        center
      >
        <div class="params-input">
          <el-input
            v-model="options.title"
            placeholder="设置空时不显示标题"
          />
        </div>
      </em-cell>
      <em-cell
        v-if="options.description!==undefined"
        title="描述信息"
        center
      >
        <div class="params-input">
          <el-input
            v-model="options.description"
            placeholder="设置空时不显示描述"
          />
        </div>
      </em-cell>
      <em-cell
        v-if="options.thumb!==undefined"
        title="标题栏位图"
        label="建议上传图标大小：125px * 30px"
      >
        <image-picker
          v-model="options.thumb"
          size="large"
          removable
        />
      </em-cell>
      <tag-field
        v-if="options.tag!==undefined"
        v-model="options.tag"
      />
      <em-cell
        v-if="options.linkText!==undefined"
        title="链接文本"
        center
      >
        <div class="params-input">
          <el-input
            v-model="options.linkText"
            placeholder="文本"
          />
        </div>
      </em-cell>
      <source-cell
        v-if="options.weblink!==undefined"
        v-model="options.weblink"
        title="数据来源"
      />
    </em-cell-group>
  </div>
</template>

<script>
import ImagePicker from '@/components/ImagePicker'
import TagField from './TagField'
import SourceCell from '@/components/SourceCell'
export default {
  name: 'SourceOption',
  components: {
    ImagePicker,
    SourceCell,
    TagField
  },
  props: {
    value: {
      type: Object,
      required: true
    }
  },
  data() {
    return {}
  },
  computed: {
    options() {
      return this.value
    }
  },
  mounted() {}
}
</script>

